package com.ins.model.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.RelationOneToOne;
import com.mybatisflex.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 推广记录 实体类。
 *
 * @author ins
 * @since 2024-05-14
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Table(value = "app_promotion")
public class AppPromotion extends BaseEntity<AppPromotion> implements Serializable {

    @Serial
    private static final long serialVersionUID = -1723142624503250004L;
    /**
     * 用户id
     */
    @Column(value = "user_id")
    private Long userId;

    /**
     * 关联信息id
     */
    @Column(value = "info_id")
    private Long infoId;

    /**
     * 时效
     */
    @Column(value = "times")
    private Integer times;

    /**
     * 价格
     */
    @Column(value = "price")
    private BigDecimal price;

    /**
     * 开始时间
     */
    @Column(value = "start_time")
    private LocalDateTime startTime;

    /**
     * 推广内容
     */
    @Column(value = "content")
    private String content;

    /**
     * 状态，1推广中，2停止
     */
    @Column(value = "status")
    private Integer status;

    @RelationOneToOne(selfField = "infoId", targetField = "id")
    private AppInfoMarket aif;


}
